home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4032 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: peer-news.britain.eu.net!strath-cs!st-and!dtrg
  2. From: dtrg@st-andrews.ac.uk (David Thomas Richard Given)
  3. Newsgroups: comp.unix.solaris,comp.unix.programmer,comp.lang.c
  4. Subject: Re: inline code
  5. Date: 1 Feb 1996 13:27:24 GMT
  6. Organization: University Of St. Andrews, Fife, UK.
  7. Distribution: inet
  8. Message-ID: <4eqf3s$gob@calvin.st-and.ac.uk>
  9. References: <lbecker-3101961334210001@206.161.148.20>
  10. NNTP-Posting-Host: edge.st-and.ac.uk
  11. NNTP-Posting-User: dtrg
  12.  
  13. In article <lbecker-3101961334210001@206.161.148.20>,
  14. Lynn Becker <lbecker@avtec.com> wrote:
  15. >I have some code that I am trying to port to the SparcStation 20 (Solaris 2.4).
  16. >We have the sparcworks c compiler. (/opt/SUNWspro/bin/cc) and it is
  17. >choking on an inline keyword (directive to the previous compiler?). I am
  18. >looking at the manual and the man pages, but haven't decided whether there
  19. >is a way to make the sun comiler accepts this notation.  Does the gcc
  20. >compiler accept this? Here is a snippet of the code I am using.
  21.  
  22. We get that problem compiling gcc code on DEC's standard compiler (cc). 
  23. The problem appears to be that cc simply doesn't understand the inline 
  24. keyword. I solve the problem by putting:
  25.  
  26. #define inline /* */
  27.  
  28. ...at the top of my code... OK, so it's just removing the problem 
  29. completely rather than fixing it, but at least it'll compile.
  30.  
  31. >inline double mathFindVectorMag
  32. >(
  33. >   CARTESIAN_STRUCT *   pVector
  34. >)
  35.  
  36. Hmm. The original writer grew up on K&R C. :)
  37.  
  38. -- 
  39. -------------------------------------------------------------------------------
  40.    Why do people surf the Information Superhighway? Won't they get run over?
  41.                http://www-hons-cs.cs.st-andrews.ac.uk/~dg
  42.               Sun-Earther David Daton Given  of Lochcarron
  43.